<template>
  <div class="shangbianlan" ref="shangbianlan1" style="background: url(./img/cebian/cebian00.jpg) 0% 0%/100% no-repeat ;">
    <div class="d1"><span>切换游戏专区</span><img src="img/cebian/shang3.png" alt="" class="i1"></div>
    <div class="d2">
      <div  @click="fun('img1')"><img src="img/cebian/shang1.png" alt=""><div>DNF端游</div></div>
      <div  @click="fun('img2')"><img src="img/cebian/shang2.png" alt=""><div>DNF手游</div></div>
    </div>
  </div>
</template>

<script>
export default {
  methods:{
    fun(i){
      if(i=='img1'){
      this.$refs.shangbianlan1.style.background='url(./img/cebian/cebian00.jpg) 0% 0% / 100% no-repeat'
      }else{
      this.$refs.shangbianlan1.style.background='url("./img/cebian/cebian08.jpg") 0% 100% / 100% no-repeat'
      }
    }
  }
};
</script>

<style scoped>
  .d1{
    text-align: center;
    padding: .2rem 0 0 0 ;
  }
  .i1{
    position: absolute;
    right: 0;
    height: .2rem;
  }
  .d2{
    display: flex;
    justify-content: space-around;
    padding: .4rem 0;
  }
  .d2 img{
    width: .5rem;
  }
  .shangbianlan{
  
  width: 100%;
  height: 100%;
}
</style>